package com.suxiaoxiao.springbootlearn.designpattern.compoundpattern.factory;

import com.suxiaoxiao.springbootlearn.designpattern.compoundpattern.Quackable;
import com.suxiaoxiao.springbootlearn.designpattern.compoundpattern.duck.DuckCall;
import com.suxiaoxiao.springbootlearn.designpattern.compoundpattern.duck.MallardDuck;
import com.suxiaoxiao.springbootlearn.designpattern.compoundpattern.duck.RedheadDuck;

/**
 * 鸭子工厂
 * @author 、
 */
public class DuckFactory extends AbstractDuckFactory {

    @Override
    public Quackable createMallardDuck() {
        return new MallardDuck();
    }

    @Override
    public Quackable createRedheadDuck() {
        return new RedheadDuck();
    }

    @Override
    public Quackable createDuckCall() {
        return new DuckCall();
    }

    @Override
    public Quackable createRubberDuck() {
        return new RedheadDuck();
    }

}
